<?php
/**
 * Created by PhpStorm.
 * User: yuyiwen
 * Date: 2018/9/13
 * Time: 下午2:39
 */

namespace app\admin\model;


class AdminRole
{
    public function getRoleIds ($admin_id)
    {
        $res = db('admin_role')->where(['admin_id'=>$admin_id])->select();
        $role_ids = '';
        foreach ($res as $key => $value){
            $role_ids .= $value['role_id']. ',';
        }
        $role_ids = rtrim($role_ids , ',');
        return $role_ids;
    }
}